using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using NCS.Library;
using NCS.Module.CMS.Library;
using NCS.Module.CMS.Library.Zones;
using NCS.Module.CMS.Web.HomePage;

namespace NCS.Module.CMS.Web.ProductService
{
    public partial class HomeZone : CMSWebControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //DataTable tbl = ZoneController.GetZones(0, Int32.Parse(AppEnv.PortalId()), 0);
            DataTable tbl = ZoneController.GetZones(0, Int32.Parse(AppEnv.PortalId()), 0);
            if (tbl != null && tbl.Rows.Count > 0)
            {

                HeadZone headzone;
                for (int i = 0; i < tbl.Rows.Count; i++)
                {
                    headzone = (HeadZone)LoadControl("HeadZone.ascx");
                    headzone.LoadZone(Int32.Parse(tbl.Rows[i]["Zone_ID"].ToString()));
                    this.PlaceHolder1.Controls.Add(headzone);
                }
            }
        }
    }
}